<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		 <link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
		<%--<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css"> --%>
		 <link rel="stylesheet"
			href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
	    <link rel="stylesheet" href="homepage/css/font-awesome.min.css">
	    <link rel="stylesheet" href="homepage/css/bootstrap.min.css">
	    <link rel="stylesheet" href="homepage/css/index.css">
	    
	    <script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
			type="text/javascript"></script> 
	    <script src="homepage/js/jquery.min.js"></script>
	    <script src="homepage/js/bootstrap.min.js"></script>
	    <script src="homepage/js/index.js"></script>
	    <title>我的订单</title>
	    <script type="text/javascript">
	    <%-- <a href="<%=basePath%>film/order/refund?orderid=${item.orderid}"
			  onclick="refund(${item.orderid})" >退票</a> --%>
			 /*  <a class="button border-yellow button-little" style="cursor:pointer;"
					 onclick="doDelete(${admin.adid})">删除</a></td> */
					 
			//退票    /* $(".message").html(data.msg).css("color:red"); */
	    	function refund(oid){
	    		if( confirm('确认退票？')){
	    			$.ajax({
	    				url:"film/order/refund",
	    				type:"get",
	    				data:{orderid:oid},
	    				dataType:"json",
	    				success:function(data){
	    					alert(data.success);
							window.location.href="film/order/orderList";
	    				}
	    			});
	    			return true;
	    		}
	    		return false;
	    	}
	    </script>
</head>
<body>
<header id="header">
    <nav id="top-nav">
        <div class="city">
            太原&nbsp;&nbsp;<small>更换</small>
        </div>
        <div class="login">
            <ul>
                <c:if test="${sessionScope.user == null}">
					<li><a href="<%=basePath%>indexlogin">登录</a></li>
				</c:if>
				<c:if test="${sessionScope.user != null}">
					<li><a>欢迎&nbsp;&nbsp;<span style="color:red">${user.username}</span>&nbsp;,&nbsp;</a>
                   <a href="<%=basePath%>indexlogout">注销</a></li>
				</c:if>
                 <li><a href="<%=basePath%>indexregist">注册</a></li>
                <li><a href="<%=basePath%>film/order/orderList">我的订单</a></li>
                <li><a href="javascript:void(0)">帮助中心</a></li>
                <li><a href="<%=basePath%>index">返回首页</a></li>
            </ul>
        </div>
    </nav>
    <div class="logo">
        <div class="content">
            <div class="left">
                <img src="homepage/img/logo.png" alt="logo" width="240px" height="90px"/>
            </div>
            <div class="right">
                <img src="homepage/img/ad.png" alt="广告" width="555px" height="89px"/>
            </div>
        </div>
    </div>
    <nav id="nav">
        <ul class="menu">
            <li class="active"><a href="#">电影首页</a></li>
            <li><a href="#">电影排期</a></li>
            <li><a href="#">移动购票</a></li>
            <li><a href="#">电影谈资</a></li>
            <li class="special"><a href="#"><i class="icon-bullhorn" style="font-size: 23px;color: #F9C221;"></i>&nbsp;&nbsp;活动促销</a></li>
        </ul>
    </nav>
    
</header>

<!--中间部分-->
<section id="main">
	<div class="crumbs">
			您当前的位置：<a class="aashy font"  href="<%=basePath%>index"
				style="display: inline">首页</a> &gt; <a class="aashy"
				href="javascript:void(0)" style="display: inline">正在热映</a>
			&gt; <a class="ablack" href="javascript:void(0)"
				style="display: inline; cursor: default;"
				title="${film.filmName } Doctor Strange">${film.filmName }</a>
	</div>
   <div class="main-middel">
   	<div class="container-fluid">
			<div class="row-fluid">
				<div class="well">
					<table class="table">
						<thead>
							<tr>
								<th>
									影厅名
								</th>
								<th>
									影片名
								</th>
								<th>
									影片日期
								</th>
								<th>
									票数
								</th>
								<th>
									票价
								</th>
								<th>
									总价
								</th>
								<th style="width: 90px;">
									操作
								</th>
							</tr>
						</thead>
						<tbody>
						
							<c:if test="${listsize != 0 }">
								<c:forEach items="${list}" var="item">
									<tr>
										<td>
											${item.screensname}
										</td>
										<td>
											${item.filmName}
										</td>
										<td>
											<fmt:formatDate value="${item.filmStartDate}"/>
										</td>
										<td>
											${item.ordernum}
										</td>
										<td>
											${item.filmPrice}
										</td>
										<td>
											${item.filmTprice}
										</td>
										<!-- refund  退票 -->
										<td>
											<a style="cursor:pointer;" onclick="refund(${item.orderid})" >退票</a>
										</td>
									</tr>
								</c:forEach>
							</c:if>
						</tbody>
					<c:set value="0" var="totalPrice"></c:set>
					<c:forEach items="${cartlist}" var="item1">
						<c:set value="${sum + item1.sgtprice}" var="sum"></c:set>
					</c:forEach>
					
				</table>
					<c:if test="${listsize == 0 }">
						<span style="color:#909090">暂无订单</span>
					</c:if>
				<div class="message">${msg}</div>
				<!-- 结算所有价格 -->
				</div>
			</div>
		</div>
   </div>
</section>

<!--脚-->
<footer id="footer">
    <div class="other">
        <div class="other-content">
            <div class="other-left">
                <a href="#">联系我们</a>
                <a href="#">电影情报</a>
                <a href="#">友情链接</a>
            </div>
            <div class="other-right">
                <a href="#">万达集团</a>
                <a href="#">万达院线官网</a>
            </div>
        </div>
    </div>
    <div class="info">
        <p>Copyright © 2011-2013 Wandafilm.com ALL rights reserved&nbsp;&nbsp;&nbsp;&nbsp;冀ICP备13013593&nbsp;&nbsp;&nbsp;&nbsp;增值电信业务经营许可证B2-20130186 </p>
    </div>
</footer>
</body>
</html>
